import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'counter_get_logic.dart';

class CounterGetPage extends StatelessWidget {
  final logic = Get.put(CounterGetLogic());
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('计数器---响应式')),
      body: Center(
        child: Obx(() => Text('点击了:${logic.count}')),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          logic.increase();
        },
        child: Icon(Icons.add),
      ),
    );
  }
}
